package com.pounds.control;

import com.pounds.pojo.UserInfo;
import com.pounds.service.UserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@CrossOrigin
@RestController
@RequestMapping("car/user_info")
public class UserInfoControl {

    @Autowired
    private UserInfoService  userInfoService;

    @GetMapping("get_info")
    public List<UserInfo> GetUserInfo(String account){
        return userInfoService.GetUserInfo(account);
    }

    @GetMapping("set_info")
    public String SetUserInfo(String username,String account,String contact,String sex,int age,String introduce){
        return userInfoService.SetUserInfo(username,account,contact,sex,age,introduce);
    }

    @GetMapping("c_col")
    public String changeCollect(String account,String collect){
        return userInfoService.changeCollect(account,collect);
    }
}
